import { createRouter, createWebHistory } from "vue-router";

const routes = [
	{ path: '/', redirect: '/main' },
	{
		name: 'main',
		path: '/main',
		component: () => import('@/views/Main.vue'),
	},
	{
		name: 'detail',
		path: '/detail/:id',
		component: () => import('@/views/Detail.vue'),
	},
	{
		name: 'editor',
		path: '/editor',
		component: () => import('@/views/MDEditor.vue'),
	}
];

const router = createRouter({
	routes,
	history: createWebHistory(),
});

export default router;
